var box = document.getElementById('shuffling');
var ul = document.getElementById('ul');
var imgs = box.getElementsByTagName('img');
var lis = ul.getElementsByTagName('li');
var num = 0;
function run(){
	num++;
	if(num==4){
		num = 0;
	}
	for(var i=0;i<imgs.length;i++){
		imgs[i].style.display = " none";
		lis[i].style.background = "#FFFFFF";
	}
	imgs[num].style.display = "block";
	lis[num].style.background = "#F73078";
    }
    timer = setInterval(run,2000);
   box.onmouseover=function(){
   	   clearInterval(timer);
   }
   box.onmouseout=function(){
       timer = setInterval(run,2000);
   }
    for(var i=0;i<lis.length;i++){
   	    lis[i].xuhao = i;
   	    lis[i].onmouseover=function(){
   	   		num = this.xuhao;
   	   		for(var j=0;j<lis.length;j++){
   	   			lis[j].style.background = "#FFFFFF";
   			imgs[j].style.display = "none";
   		}
   		lis[num].style.background = "#F73078";
   		imgs[num].style.display = "block";
    }
}
	